package com.calefk.util {
	/**
	 * Permite recorrer un arreglo de forma sencilla 
	 */
	public class Iterator {
		
		private var mData:Array;
		private var mIndex:int = 0;
		
		public function Iterator(_data:Array) {
			mData = _data;
			mIndex = 0;
		}
		
		public function next():* {
			return mData[mIndex++];
		}
		
		public function current():* {
			return mData[mIndex - 1];
		}
		
		public function hasNext():Boolean {
			return (mIndex < mData.length);
		}
		
		public function remove():void {
			mData.splice(mIndex - 1 , 1);
			mIndex--;
		}
		
		public function reset():void {
			mIndex = 0;
		}
	}
}